| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | /* globals versionCompare, atob, btoa */ |
||
| 43 | this.versionControl = function () { |
||
| 44 | // delete saves older than this version |
||
| 45 | if (state.player.version && versionCompare(state.player.version, '2.6.0') < 0) { |
||
| 46 | state.player = {}; |
||
| 47 | } |
||
| 48 | // we merge the properties of the player with the start player to |
||
| 49 | // avoid undefined errors with new properties |
||
| 50 | state.player = angular.merge({}, data.start_player, state.player); |
||
| 51 | }; |
||
| 52 | } |
||
| 54 |